<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"><html><head><title>DevIL Documentation, ilTexImage</title></head><body topmargin="0" bgcolor="white"><font face="verdana"><img src="../images/DevIL.gif"><br></font>
<style type="text/css">
A.color{color: FFFFFF;text-decoration: none;}
</style>



<table width="100%" cols="2" border="0" bgcolor="navy"><tr align="left"><td align="left"><font color="white">DevIL Documentation</font></td><td align="right"><font color="white">
<a class="color" href="ilSetWrite.html">Previous</a> |
<a class="color" href="index.html">IL</a> |
<a class="color" href="IL_ALL_ATTRIB_BITS.html">Next</a>
</font></td></tr></table><br/><table><tr><td>&nbsp;</td><td>
<p><h3>ilTexImage</h3></p><table><tr><td>&nbsp;</td><td>
<p><font size="-1">Any current image data is destroyed by ilTexImage and replaced by a new image with the attributes specified. The new image data has undefined values. To set the new image data to a certain value, use ilClearImage or ilClearImageTo.</font></p>
<table><tr><td>&nbsp;</td><td><p><pre><code><b>ILboolean ilTexImage(<br/></b>&nbsp;&nbsp;<b>ILuint</b> <i>Width</i>, <b>ILuint</b> <i>Height</i>, <b>ILuint</b> <i>Depth</i>, <b>ILubyte</b> <i>numberOfChannels</i>, <b>ILenum</b> <i>Format</i>, <b>ILenum</b> <i>Type</i>, <b>ILvoid *</b> <i>Data</i> <b>);</b></code></pre></p></dl></p></td></tr></table>
<br/><p><h4>Parameters</h4><table><tr><td>&nbsp;</td><td><dl><dt><i><font size="-1">Width</font></i></font></dt><dd><font size="-1">Specifies the new image width. This cannot be 0.</font></dd> <dt><i><font size="-1">Height</font></i></font></dt><dd><font size="-1">Specifies the new image height. This cannot be 0.</font></dd> <dt><i><font size="-1">Depth</font></i></font></dt><dd><font size="-1">Specifies the new image depth. Anything greater than 1 will make the image 3d. This cannot be 0.</font></dd> <dt><i><font size="-1">numberOfChannels</font></i></font></dt><dd><font size="-1">Specifies the new channels. Common values are 3 and 4.</font></dd> <dt><i><font size="-1">Format</font></i></font></dt><dd><font size="-1">Specifies the data format this image has. For a list of values this can be, see the See Also section.</font></dd> <dt><i><font size="-1">Type</font></i></font></dt><dd><font size="-1">Specifies the data format this image has. For a list of values this can be, see the See Also section.</font></dd> <dt><i><font size="-1">Data</font></i></font></dt><dd><font size="-1">Specifies data that should be copied to the new image. If this parameter is NULL, no data is copied, and the new image data consists of undefined values.</font></dd></dl></p></td></tr></table><br/><h4>Errors</h4><table><tr><td>&nbsp;</td><td><dl><dt><a href="../IL/IL_ILLEGAL_OPERATION.html"><font size="-1">IL_ILLEGAL_OPERATION</font></a></dt><dd><font size="-1">The operation attempted is not allowable in the current state. The function returns with no ill side effects. Generally there is currently no image bound or it has been deleted via ilDeleteImages. You should use ilGenImages and ilBindImage before calling the function.</font></dd>
<dt><font size="-1">IL_INVALID_PARAM</font></dt><dd><font size="-1">One of the parameters provided was invalid. Width, Height, Depth or Bpp was an incorrect 0.</font></dd>
<dt><a href="../IL/IL_OUT_OF_MEMORY.html"><font size="-1">IL_OUT_OF_MEMORY</font></a></dt><dd><font size="-1">Could not allocate enough memory for the image data.</font></dd>
</dl></td></tr></table></p>
<h4>See Also</h4><table><tr><td>&nbsp;</td><td><dl><a href="../Constants/Data Formats.html"><font size="-1">Data Formats</font></a>, 
<a href="../Constants/Data Types.html"><font size="-1">Data Types</font></a>, 
<a href="../ILUT/ilBindImage.html"><font size="-1">ilBindImage</font></a>, 
<a href="../ILU/ilGenImages.html"><font size="-1">ilGenImages</font></a>, 
</td></tr></table></p>
</td></tr></table>



<br/></body></html>
